home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-12-02 | 6.6 KB | 263 lines | [TEXT/MPS ] |
- ; File: TextServices.a
- ;
- ; Copyright: © 1983-1993 by Apple Computer, Inc.
- ; All rights reserved.
- ;
- ; Version: System 7.1 for ETO #11
- ; Created: Tuesday, March 30, 1993 18:00
- ;
- ;___________________________________________________________________________
-
- IF &TYPE('__TSMAINCLUDE__') = 'UNDEFINED' THEN
- __TSMAINCLUDE__ SET 1
-
-
- kTSMVersion equ 1 ; Version of the Text Services Manager
- kTextService equ 'tsvc' ; component type for the component description
- kInputMethodService equ 'inpm' ; component subtype for the component description
- ;;-------------------------------------------------------------------------;;
-
-
- tsmUnsupScriptLanguageErr EQU -2500 ;
- tsmInputMethodNotFoundErr EQU -2501 ;
- tsmNotAnAppErr EQU -2502 ; not an application error
- tsmAlreadyRegisteredErr EQU -2503 ; want to register again error
- tsmNeverRegisteredErr EQU -2504 ; app is not TSM aware error
- tsmInvalidDocIDErr EQU -2505 ; invalid TSM documentation id
- tsmTSMDocBusyErr EQU -2506 ; document is still active
- tsmDocNotActiveErr EQU -2507 ; document is NOT active
- tsmNoOpenTSErr EQU -2508 ; no open text service
- tsmCantOpenComponentErr EQU -2509 ; can't open the component
- tsmTextServiceNotFoundErr EQU -2510 ; no text service found
- tsmDocumentOpenErr EQU -2511 ; there are open documents
- tsmUseInputWindowErr EQU -2512 ; not TSM aware because we are using input window
- tsmTSHasNoMenuErr EQU -2513 ; the text service has no menu
- tsmTSNotOpenErr EQU -2514 ; no open text service to close
- tsmComponentAlreadyOpenErr EQU -2515 ; text service already opened for the document
-
- tsmInputMethodIsOldErr EQU -2516 ; returned by GetDefaultInputMethod ONLY
- tsmScriptHasNoIMErr EQU -2517 ; script has no imput method or is using old IM.
- tsmUnsupportedTypeErr EQU -2518 ; unSupported interface type error
- tsmUnknownErr EQU -2519 ; any other errors
-
- ;;-------------------------------------------------------------------------;;
-
-
-
-
-
- _TSMDispatch OPWORD $AA54 ; should be moved later
- TSMTrapNumber EQU $AA54
-
-
- ; Text Services Manager function selectors ...
-
- kNewTSMDocument equ 0 ; create new TSM aware document
- kDeleteTSMDocument equ 1 ; delete TSM aware document
- kActivateTSMDocument equ 2 ; activate TSM aware document
- kDeactivateTSMDocument equ 3 ; deactivate TSM aware document
- kTSMEvent equ 4 ; pass all events to TSM
- kTSMMenuSelect equ 5 ; pass menu selection to TSM
- kSetTSMCursor equ 6 ; set the cursor
- kFixTSMDocument equ 7 ; terminate text services
- kGetServiceList equ 8 ; get all text service components
- kOpenTextService equ 9 ; open the text service
- kCloseTextService equ 10 ; close the text service
- kSendAEFromTSMComponent equ 11 ; send Apple Event from component to client
-
-
- ;; Utilities ...
-
- kSetDefaultInputMethod equ 12 ;
- kGetDefaultInputMethod equ 13 ; (Get = D)
- kSetTextServiceLanguage equ 14 ;
- kGetTextServiceLanguage equ 15 ;
- kUseInputWindow equ 16 ;
- kNewServiceWindow equ 17 ;
- kCloseServiceWindow equ 18 ;
- kGetFrontServiceWindow equ 19 ;
-
-
- kInitTSMAwareApplication equ 20 ; claim TSM aware application
- kCloseTSMAwareApplication equ 21 ; application deregisters itself as TSM aware
- kFindServiceWindow equ 23
-
- ;;-------------------------------------------------------------------------;;
-
-
-
- ;; Low level routines which are dispatched directly to the Component Manager ...
- kCMGetScriptLangSupport equ $00040001 ;
- kCMInitiateTextService equ $00000002 ;
- kCMTerminateTextService equ $00000003 ;
- kCMActivateTextService equ $00000004 ;
- kCMDeactivateTextService equ $00000005 ;
- kCMTextServiceEvent equ $00060006 ;
- kCMGetTextServiceMenu equ $00040007 ;
- kCMTextServiceMenuSelect equ $00060008 ;
- kCMFixTextService equ $00000009 ;
- kCMSetTextServiceCursor equ $0004000A ;
-
- ;;-------------------------------------------------------------------------;;
-
-
-
- ;; trap routine macros ...
-
- macro
- _NewTSMDocument
- move.w #kNewTSMDocument,d0
- _TSMDispatch
- endm
-
-
- macro
- _DeleteTSMDocument
- move.w #kDeleteTSMDocument,d0
- _TSMDispatch
- endm
-
-
- macro
- _ActivateTSMDocument
- move.w #kActivateTSMDocument,d0
- _TSMDispatch
- endm
-
-
- macro
- _DeactivateTSMDocument
- move.w #kDeactivateTSMDocument,d0
- _TSMDispatch
- endm
-
- macro
- _TSMEvent
- move.w #kTSMEvent,d0
- _TSMDispatch
- endm
-
- macro
- _TSMMenuSelect
- move.w #kTSMMenuSelect,d0
- _TSMDispatch
- endm
-
- macro
- _SetTSMCursor
- move.w #kSetTSMCursor,d0
- _TSMDispatch
- endm
-
- macro
- _FixTSMDocument
- move.w #kFixTSMDocument,d0
- _TSMDispatch
- endm
-
- macro
- _GetServiceList
- move.w #kGetServiceList,d0
- _TSMDispatch
- endm
-
- macro
- _OpenTextService
- move.w #kOpenTextService,d0
- _TSMDispatch
- endm
-
- macro
- _CloseTextService
- move.w #kCloseTextService,d0
- _TSMDispatch
- endm
-
- macro
- _SendAEFromTSMComponent
- move.w #kSendAEFromTSMComponent,d0 ; kSendAEFromTSMComponent = 11
- _TSMDispatch
- endm
-
- macro
- _InitTSMAwareApplication
- move.w #kInitTSMAwareApplication,d0
- _TSMDispatch
- endm
-
-
- macro
- _CloseTSMAwareApplication
- move.w #kCloseTSMAwareApplication,d0
- _TSMDispatch
- endm
-
- macro
- _SetDefaultInputMethod
- move.w #kSetDefaultInputMethod,d0
- _TSMDispatch
- endm
-
- macro
- _GetDefaultInputMethod
- move.w #kGetDefaultInputMethod,d0
- _TSMDispatch
- endm
-
- macro
- _SetTextServiceLanguage
- move.w #kSetTextServiceLanguage,d0
- _TSMDispatch
- endm
-
- macro
- _GetTextServiceLanguage
- move.w #kGetTextServiceLanguage,d0
- _TSMDispatch
- endm
-
- macro
- _UseInputWindow
- move.w #kUseInputWindow,d0
- _TSMDispatch
- endm
-
- macro
- _NewServiceWindow
- move.w #kNewServiceWindow,d0
- _TSMDispatch
- endm
-
- macro
- _CloseServiceWindow
- move.w #kCloseServiceWindow,d0
- _TSMDispatch
- endm
-
- macro
- _GetFrontServiceWindow
- move.w #kGetFrontServiceWindow,d0
- _TSMDispatch
- endm
-
- macro
- _FindServiceWindow
- move.w #kFindServiceWindow,d0
- _TSMDispatch
- endm
-
-
- kUnknownScript EQU $FFFF ; undefined script
- kUnknownLanguage EQU $FFFF ; undefined language
-
-
- ScriptLanguageRec RECORD 0
- fScript ds.w 1 ; (word) script code
- fLanguage ds.w 1 ; (word) language code
- ENDR
-
-
-
-
-
- ENDIF ; ...already included